﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="rbgl.aspx.cs" Inherits="Catering.Catering_Page.richang.rbgl" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=7" />
    <title>日报管理</title>
    <link rel="stylesheet" type="text/css" href="../../Style/head_2.css" />
    <link rel="stylesheet" type="text/css" href="../../Style/center.css" />
    <link rel="stylesheet" type="text/css" href="../../Style/zhezhao_2.css" />
    <script src="../../Style/zhezhao.js" type="text/javascript"></script>
    <script src="../../Style/xxk.js" type="text/javascript"></script>
    <script src="../../Scripts/jquery-1.4.1.js" type="text/javascript"></script>
    <script language="javascript" type="text/javascript" src="../../Scripts/My97DatePicker/WdatePicker.js"></script>
    <style type="text/css">
        .Create_Recipe
        {
            margin-top: 0;
        }
        .Create_Recipe
        {
            border: 1px solid #159aec;
            border-top: none;
            width: 998px;
        }
        .soso_lt
        {
            padding: 5px 0;
        }
        .soso_lt a
        {
            margin-left: 3px;
        }
        .swxx_table thead td{ border-top:1px solid #ccc;}
        .swxx_table tbody td{ border-right:1px solid #ccc;}
        .xh_td{ border-left:1px solid #ccc; background-color:#f5f5f5;}
        #fuwurenyuan_List input{ width:80px;}
        #fuwurenyuan_List input.specail{ width:130px;}
        .red{ color:#ff0000;}
    </style>
    <script type="text/javascript">
        $(document).ready(function () {
            $("#ddl_moon").hide();
            $("#cbo_moon").change(function () {
                if ($(this).is(":checked")){
                    $("#ddl_moon").show();
                } else {
                    $("#ddl_moon").hide();
                }
            });
            
            var strfuwurenyuanOption = '<%=GetFuWuOption()%>';
            //添加服务人员
            $("#Add_fuwurenyuan").click(function () {
                var i = Math.floor(Math.random() * 1000);
                var xuhao = parseInt(1);
                if ($("#fuwurenyuan_List td[xihao='0']") != null && $("#fuwurenyuan_List td[xihao='0']").last().text() != '') {
                    xuhao = parseInt($("#fuwurenyuan_List td[xihao='0']").last().text()) + 1;
                }
                var bazun = $("#Drop_BanZu ").val();
                if (bazun == 48 || bazun == 2 || bazun == 4 || bazun == 30) {
                    $("#fuwurenyuan_List").append("<tr id=\"tr_" + i + "\">" +
                                    "<td align=\"center\" class=\"xh_td\" xihao='0'>" + xuhao + "</td>" +
                                    "<td align='center'><input type='text' name='TypeName' style='width:80%; padding:0px;' /></td><td align='center'><input type='text' name='TypeNumber' onblur='Set_PersonNum()'  style='width:80%;' /></td>" +
                                    "<td align='center'><input type='text' name='SpecialRate' style='width:80%; padding:0px;' /></td>" +
                                    "<td align=\"center\"><a href=\"javascript:void(0);\" onclick=\"Del_FuWutr('tr_" + i + "')\"><img src=\"../../../Images/trash.gif\" /></a></td></tr>");
                }
                else {
                    $("#fuwurenyuan_List").append("<tr id=\"tr_" + i + "\">" +
                                    "<td align=\"center\" class=\"xh_td\" xihao='0'>" + xuhao + "</td>" +
                                    "<td align='center'><input type='text' name='TypeName' style='width:80%; padding:0px;' /></td><td align='center'><input type='text' name='TypeNumber' onblur='Set_PersonNum()'  style='width:80%;' /></td>" +
                                    "<td align='center' style='display:none;'><input type='text' name='SpecialRate' style='width:80%; padding:0px;' /></td>" +
                                    "<td align=\"center\"><a href=\"javascript:void(0);\" onclick=\"Del_FuWutr('tr_" + i + "')\"><img src=\"../../../Images/trash.gif\" /></a></td></tr>");
                }

            });

            //添加配餐人员
            $("#Add_peicanrenyuan").click(function () {
                $("#peicanrenyuan_List tr").each(
                    function () {
                        var temp = $(this).attr("cid");
                        var obj = $("#PeiCanRenYuan tr[cid='" + temp + "']");
                        if (obj != null) obj.hide();
                    }
                );
                divshow("divmain2", "divup2");
            });

            $("#PeiCanRenYuan tr").css("cursor", "pointer");
            $("#PeiCanRenYuan tr").mouseover(function () {
                $("#PeiCanRenYuan tr").css("background-color", "#fff");
                $(this).css("background-color", "#999");
            });

            $("#PeiCanRenYuan tr").click(function () {
                var id = $(this).attr("cid");
                var name = $(this).attr("cname");
                var gangwei = $(this).attr("cgangwei");
                var xuhao = parseInt(1);
                if ($("#peicanrenyuan_List td[xihao='0']") != null && $("#peicanrenyuan_List td[xihao='0']").last().text() != '') {
                    xuhao = parseInt($("#peicanrenyuan_List td[xihao='0']").last().text()) + 1;
                }
                $("#peicanrenyuan_List").append("<tr cid=\"" + id + "\" cname=\"" + name + " \"><td align=\"center\" class=\"xh_td\" xihao='0'>" + xuhao + "</td>" +
                                                    "<td align=\"center\">" + name + "</td>" +
                                                    "<td align=\"center\">" + gangwei + "</td>" +
                                                    "<td align=\"center\"><a href=\"javascript:void(0);\" onclick=\"Del_tr('" + id + "')\"><img src=\"../../../Images/trash.gif\" alt='删除' /></a>" +
                                                    "<a href=\"javascript:void(0);\" onclick=\"SetAnQuan_tr('" + id + "','" + name + "')\"><img src=\"../../../Images/yes.png\" alt='设为安全员' /></a>" +
                                                    "</td></tr>");
                if (gangwei == "管事") {
                    SetGuanshi_tr(id, name);
                }
                divhidel("divmain2", "divup2");
            });

            $("#txt_dingyuan").blur(Set_PersonNum);
            $("#fuwurenyuan_List tr").each(function () {
                $(this).find("input[name='TypeNumber']").blur(Set_PersonNum);
            });
            $("#Drop_BanZu").attr("propertychange", function () {
                var bazun = $("#Drop_BanZu ").val();
                //48：渤西终端，2：精细化工，4：绥中终端，30：渤南终端
                if (bazun == 48 || bazun == 2 || bazun == 4 || bazun == 30) {
                    $("#tab_fuwurenyuan tr td::nth-child(4)").show();
                }
                else {
                    $("#tab_fuwurenyuan tr td::nth-child(4)").hide();
                }
            });
        });

        function Set_PersonNum() {
            var temp1 = $("#txt_dingyuan").val();
            var num1 = 0;
            if (!isNaN(temp1)) num1 = parseInt(temp1);
            $("#fuwurenyuan_List tr").each(function () {
                var temp2 = $(this).find("input[name='TypeNumber']").val();
                if (!isNaN(temp2)) num1 = parseInt(num1) + parseInt(temp2);
            });
            $("#txt_renyuancount").val(num1);
        }

        function Del_tr(pid) {
            $("#peicanrenyuan_List tr[cid='" + pid + "']").remove();
            $("#PeiCanRenYuan tr[cid='" + pid + "']").show();
            if (pid == $("#HF_Guanshi").val()) {
                SetGuanshi_tr("", "");
            }

        }

        function Del_FuWutr(n) {
            $("#" + n).remove();
        }


        //保存日报信息
        function Save() {
            var txt_weixiujieguo = $("#txt_weixiujieguo").val();
            if (txt_weixiujieguo == "") {
                alert("结果无内容须填“无事”！");
                return;
            }

            var txt_anquanyinhuan = $("#txt_anquanyinhuan").val();
            if (txt_anquanyinhuan == "") {
                alert("安全隐患无内容须填“无事”！");
                return;
            }

            var txt_dishtest = $("#txt_dishtest").val();
            if (txt_dishtest == "") {
                alert("上料验收无内容须填“合格”！");
                return;
            }
            
            var yuanying = $("#txt_weixiuyuanying").val();
            if (yuanying == "") {
                alert("维修无内容须填“无事”！");
                return;
            }

            var riqi = $("#Txt_data").val();
            var banzuID = $("#Drop_BanZu").val();
            $.ajax({
                type: "Post",
                url: "rbgl.aspx/IsExists",
                data: "{'strdate':'" + riqi + "','ClassID':'" + banzuID + "'}",
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                async: false,
                success: function (data) {
                    if (data.d == "OK") {//存在
                        if (!confirm("存在该日日报，是否覆盖？")) {
                            return;
                        }
                        else {
                            Save_DailyManagement();
                        }
                    }
                    else {
                        Save_DailyManagement();
                    }
                }
            });
        }

        function Save_DailyManagement() {
            var zuoyequID = $("#Drop_ZuoYeQu").val();
            var banzuID = $("#Drop_BanZu").val();
            var tianbiaoren = $("#Txt_Tianbiaoren").val();
            var riqi = $("#Txt_data").val();
            var dingyuan = $("#txt_dingyuan").val();
            var renyuancount = $("#txt_renyuancount").val();
            var fuwenti = $("#txt_wenti").val();
            var fuzhiliang = $("#txt_zhiliang").val();
            var yuanying = $("#txt_weixiuyuanying").val();
            var jieguo = $("#txt_weixiujieguo").val();
            var anquanyinhuan = $("#txt_anquanyinhuan").val();
            var dishtest = $("#txt_dishtest").val();
            var strnumList = "";
            
            $("#fuwurenyuan_List tr").each(function () {
                strnumList += $(this).find("input[name='TypeNumber']").val() + "|";
            });
            $.ajax({
                type: "Post",
                url: "rbgl.aspx/Save_DailyManagement",
                data: "{'banzuID':'" + banzuID + "','strdate':'" + riqi + "','gwgz':'" + fuwenti + "','fwzl':'" + fuzhiliang + "','wxyy':'" + yuanying + "','wxjg':'" + jieguo + "','dingyuan':'" + dingyuan + "','renyuancount':'" + renyuancount + "','strnumList':'" + strnumList + "','SecurityRisks':'" + anquanyinhuan + "','dishtest':'" + dishtest + "','userid':'<%=m_UserID %>'}",
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (data) {
                    if (data.d == "OK") {
                        Save_AttendanceRecord();
                    }
                }
            });
        }

        //保存考情信息
        function Save_AttendanceRecord() {
            var riqi = $("#Txt_data").val();
            var banzuID = $("#Drop_BanZu").val();
            
            var strRenID_list = "";
            $("#peicanrenyuan_List tr").each(function () {
                strRenID_list += $(this).attr("cid") + "|";
            });
            var strGuanshi=$("#HF_Guanshi").val();
            var strAnQuan=$("#HF_AnQuan").val();

//            if (strRenID_list != "") {
                $.ajax({
                    type: "Post",
                    url: "rbgl.aspx/Save_AttendanceRecord",
                    data: "{'strID':'" + strRenID_list + "','strdate':'" + riqi + "','ClassID':'" + banzuID + "','GuanShi':'" + strGuanshi + "','AnQuan':'" + strAnQuan + "'}",
                    contentType: "application/json; charset=utf-8",
                    dataType: "json",
                    success: function (data) {
                        if (data.d == "OK") {
                            Save_Dynamic();
                        }
                    }
                });
//            }
//            else {
//                Save_Dynamic();
//            }
        }

        //保存就餐动态信息
        function Save_Dynamic() {
            var zuoyequID = $("#Drop_ZuoYeQu").val();
            var banzuID = $("#Drop_BanZu").val();
            var riqi = $("#Txt_data").val();
            var dingyuan = $("#txt_dingyuan").val();
            var strnumList = "";
            var strRenID_list = "";

            $("#fuwurenyuan_List tr").each(function () {
                strnumList += $(this).find("input[name='TypeNumber']").val() + "|";
            });            
            $("#peicanrenyuan_List tr").each(function () {
                strRenID_list += $(this).attr("cid") + "|";
            });

            $.ajax({
                type: "Post",
                url: "rbgl.aspx/Save_Dynamic",
                data: "{'GroupID':'" + zuoyequID + "','ClassID':'" + banzuID + "','strdate':'" + riqi + "','persons':'" + dingyuan + "','Number':'" + strnumList + "','strID':'" + strRenID_list + "'}",
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (data) {
                    if (data.d == "OK") {
                        Save_Dynamics();
                    }
                }
            });
        }

        function Save_Dynamics() {
            var zuoyequID = $("#Drop_ZuoYeQu").val();
            var banzuID = $("#Drop_BanZu").val();
            var riqi = $("#Txt_data").val();
            var strtyepList = "";
            var strnumList = "";
            var strrateList = "";

            $("#fuwurenyuan_List tr").each(function () {
                strtyepList += $(this).find("input[name='TypeName']").val() + "|";
                strnumList += $(this).find("input[name='TypeNumber']").val() + "|";
                strrateList += $(this).find("input[name='SpecialRate']").val() + "|";
            });

//            if (strnumList != "" && strtyepList != "") {
            $.ajax({
                type: "Post",
                url: "rbgl.aspx/Save_Dynamics",
                data: "{'GroupID':'" + zuoyequID + "','ClassID':'" + banzuID + "','strdate':'" + riqi + "','strtyepList':'" + strtyepList + "','strnumList':'" + strnumList + "','strrageList':'" + strrateList + "'}",
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (data) {
                    if (data.d == "OK") {
                        Save_ChengBaoShang();
                    }
                }
            });
//            }
//            else {
//                alert("保存成功！");
//                window.location.href = 'rbgl.aspx';
//            }

        }
        function Save_ChengBaoShang() {
            var zuoyequID = $("#Drop_ZuoYeQu").val();
            var banzuID = $("#Drop_BanZu").val();
            var riqi = $("#Txt_data").val();
            var idlist = "";
            var conlist = "";

            $("#cbslist table").each(function () {
                idlist += $(this).find("input[name='HF_ID']").val() + "|";
                conlist += $(this).find("textarea[name='HF_Text']").val() + "◎";
            });

            $.ajax({
                type: "Post",
                url: "rbgl.aspx/Save_ChengBaoShang",
                data: "{'GroupID':'" + zuoyequID + "','ClassID':'" + banzuID + "','strdate':'" + riqi + "','idlist':'" + idlist + "','strtextList':'" + conlist + "'}",
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (data) {
                    if (data.d == "OK") {
                        alert("保存成功！");
                        window.location.href = 'rbgl.aspx';
                    }
                }
            });
        }

        function DeleteRiBao() {
            if (!confirm("您确定要删除今日日报？")) return;
            var riqi = $("#Txt_data").val();
            var banzuID = $("#Drop_BanZu").val();
            $.ajax({
                type: "Post",
                url: "rbgl.aspx/DeleteRiBao",
                data: "{'strdate':'" + riqi + "','ClassID':'" + banzuID + "'}",
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                async: false,
                success: function (data) {
                    if (data.d == "OK") {//存在
                        alert("删除成功！");
                        history.go(-1);
                    }
                    else {
                        alert("删除失败！");
                    }
                }
            });
        }

        function SetGuanshi_tr(id, name) {
            $("#Lbl_Guanshi").text(name);
            $("#HF_Guanshi").val(id);
        }

        function SetAnQuan_tr(id, name) {
            $("#Lbl_AnQuan").text(name);
            $("#HF_AnQuan").val(id);
        }

    </script>
    <style type="text/css">
        #ContractorList{width:550px; margin-top:6px; min-height:297px; overflow-y:scroll; }
        #ContractorList table{ width:533px;}
        #ContractorList table th{height:26px; line-height:26px; background-color:#E5F1FD;}
        #ContractorList table td{height:26px; line-height:26px; text-align:center; }
        
</style>
    <script type="text/javascript">
        function ShowContractor(id) {
            divshow("divmain2", "divup3");
            document.getElementById("divup3").style.top = (document.body.clientHeight/2+300) + "px";
            SearchContractor(id);
        }

        function SearchContractor(id) {
            var ctxt = $("#Txt_Cname").val();
            var cdate = $("#Txt_data").val();
            $.ajax({
                type: "Post",
                url: "rbgl.aspx/SearchConTractorList",
                data: "{'CName':'" + ctxt + "','TagID':'" + id + "','CTime':'" + cdate + "'}",
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                async: false,
                success: function (data) {
                    if (data.d != "") {//存在
                        document.getElementById("ContractorList").innerHTML = data.d;
                    }
                    else {
                        document.getElementById("ContractorList").innerHTML = "";
                    }
                }
            });
        }

        function GetContractor(id, name, tagid) {
            $("#HF_ID_" + tagid).val(id);
            $("#HF_Name_" + tagid).val(name);
            divhidel("divmain2", "divup3");
        }

        var cbsnum = 1;

        function delChengbaoshang(id) {
            $("#cbsTable_ID_" + id).remove();
        }

        function newChengbaoshang() {
            var count = $("#cbslist table").length+1;
            $("#cbslist").append("<table id='cbsTable_ID_" + count + "'><tr><td><input class='input_bg' id='HF_Name_" + count + "' name='HF_Name' readonly='readonly' value=''/>" +
            "<a href=\"javascript:ShowContractor('" + count + "')\">选择承包商</a><input type='hidden' name='HF_ID' id='HF_ID_" + count + "' value='' />" +
            "</td></tr><tr><td><textarea class='input_bg' id='HF_Text_" + count + "' name='HF_Text' style=\"line-height:16px; width:469px; height:100px; \"></textarea>" +
            "</td></tr><tr><td ><a href=\"javascript:delChengbaoshang('" + count + "')\">删除</a></td></tr></table>");
        }
    </script>
</head>
<body>
    <form runat="server">
        <div class="xxk_button1">
            <ul>
                <li id="li2_1" class="li_out li_over"><a href="rbgl.aspx">填写日报</a> </li>
                <li id="li2_2" class="li_out"><a href="rbtj.aspx">日报统计</a> </li>
            </ul>
        </div>
        <div class="Center_Content" id="div_search" style="display: block">
        <div class="div_0207 left_width500" style="height:34px; width:998px;">
            <table align="left" width="100%" border="0" cellspacing="0" cellpadding="0" class="ckgl_table" style="height:34px;">
                <thead>
                    <tr>
                        <td width="65" align="right">作业区： </td>
                        <td width="115">
                            <asp:DropDownList ID="Drop_ZuoYeQu" runat="server" AutoPostBack="true" CssClass="select_input_bg" Width="104" OnSelectedIndexChanged="Drop_ZuoYeQu_SelectedIndexChanged"></asp:DropDownList>
                        </td>
                        <td width="75" align="right">班　组：</td>
                        <td width="115">
                            <asp:DropDownList ID="Drop_BanZu" AutoPostBack="true" runat="server" CssClass="select_input_bg" Width="104" OnSelectedIndexChanged="Drop_BanZu_SelectedIndexChanged"></asp:DropDownList>
                        </td>
                        <td width="65" align="right">填表人：</td>
                        <td width="115"><asp:TextBox ID="Txt_Tianbiaoren" runat="server" CssClass="input_bg" Width="100" Enabled="false"></asp:TextBox></td>
                        <td width="45" align="right">日期：</td>
                        <td width="115" align="right"><asp:TextBox ID="Txt_data" runat="server" CssClass="input_bg" Width="100"></asp:TextBox></td>
                        <td>&nbsp;</td>                        
                        <td width="100" align="right"><asp:Button runat="server" ID="btn_Search" Text="查询" CssClass="input_btn_a" OnClick="btn_Search_Click" /></td>
                        <%if (Catering.Toolss.IsVerification(Session["RoleID"].ToString(), "ribaoguanli.aspx", "操作"))
                          { %>
                        <td width="100" align="right"><a href="javascript:void(0);" onclick="Save()">保存</a></td>
                        <td width="100" align="right"><a href="javascript:void(0);" onclick="DeleteRiBao()">删除</a></td>
                        <%} %>
                        <td width="10"></td>
                    </tr>
                </thead>
            </table>
        </div>
    </div>
    <div class="Center_Content" id="div2_1" style="display: block">
        <div class="div_0207 left_width500" style="width:998px; height: auto;">
            <table cellpadding="0" cellspacing="0" border="0" width="100%">
                <tr>
                    <td colspan="2">
                        <table width="100%" cellpadding="0" cellspacing="0" border="0" style="background-color:#E5F1FD; border-bottom:1px solid #C2DEF6;">
                            <tr>
                                <td height="35" width="65" align="right">定　员：</td>
                                <td width="115"><asp:TextBox runat="server" CssClass="input_bg" ID="txt_dingyuan" Width="100"></asp:TextBox></td>
                                <td width="75" align="right">收费人数：</td>
                                <td width="115"><asp:TextBox runat="server" ReadOnly="true" CssClass="input_bg" style="background-color:#EAEAEA; background-image:none;" ID="txt_renyuancount" Width="100"></asp:TextBox></td>
                                <td width="75" align="right">
                                    <asp:CheckBox ID="cbo_moon" runat="server" Text="卫星平台" />
                                </td>
                                <td>
                                    <asp:DropDownList ID="ddl_moon" AutoPostBack="true" runat="server" CssClass="select_input_bg" Width="104">
                                    </asp:DropDownList>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td valign="top" width="499">
                        <table width="489" align="right" cellpadding="0" cellspacing="0" border="0">
                            <tr>
                                <td width="120" height="46">&nbsp;&nbsp;&nbsp;&nbsp;一、服务人员</td>
                                <td align="right">
                                    <input type="button" class="input_btn_a" value="新增" id="Add_fuwurenyuan" />
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2">
                                    <table width="100%" id="tab_fuwurenyuan" border="0" align="left" cellpadding="0" cellspacing="0" class="swxx_table">
                                        <thead>
                                            <tr class="xh_td">
                                                <td align="center" width="10%" style="border-left:1px solid #ccc;">序号</td>
                                                <td align="center" width="37%">就餐人员单位</td>
                                                <td align="center" width="23%">就餐人数</td>
                                                <td align="center" width="20%" style="display:none;">特殊费率</td>                                      
                                                <td align="center" width="10%">操作</td>
                                            </tr>
                                        </thead>
                                        <tbody id="fuwurenyuan_List">
                                            <asp:Repeater ID="Rep_jiucan" runat="server">
                                                <ItemTemplate>
                                                    <tr id="tr_<%#Eval("id")%>">
                                                        <td align="center" class="xh_td" xihao='0'><%# Container.ItemIndex + 1%></td>
                                                        <td><input class="specail" type="text" name="TypeName" value="<%#Eval("temp1")%>" /></td>
                                                        <td><input type="text" name="TypeNumber" value="<%#Eval("Eat")%>" /></td>
                                                        <td style="display:none;"><input type="text" name="SpecialRate" value="<%#Eval("SpecialRate")%>" /></td>
                                                        <td align="center">
                                                            <a href="javascript:void(0);" onclick="Del_FuWutr('tr_<%#Eval("id")%>')"><img src="../../../Images/trash.gif" /></a>
                                                        </td>
                                                    </tr>
                                                </ItemTemplate>
                                            </asp:Repeater>
                                        </tbody>
                                    </table>
                                </td>
                            </tr>
                            <tr>
                                <td height="46">&nbsp;&nbsp;&nbsp;二、配餐在岗人员</td>
                                <td align="right"><input type="button" class="input_btn_a" value="新增" id="Add_peicanrenyuan" /></td>
                            </tr>
                            <tr>
                                <td colspan="2">
                                    <table width="100%" border="0" align="left" cellpadding="0" cellspacing="0" class="swxx_table">
                                        <thead>
                                            <tr class="xh_td">
                                                <td align="center" width="20%" style="border-left:1px solid #ccc;">序号</td>
                                                <td align="center" width="23%">配餐人员</td>
                                                <td align="center" width="37%">所属岗位</td>
                                                <td align="center" width="20%">操作</td>
                                            </tr>
                                        </thead>
                                        <tbody id="peicanrenyuan_List">
                                            <asp:Repeater runat="server" ID="Rep_peican">
                                                <ItemTemplate>
                                                    <tr cid="<%#Eval("PID") %>" cname="<%#Eval("PName") %>">
                                                        <td align="center" class="xh_td" xihao='0'>
                                                            <%# Container.ItemIndex + 1%>
                                                        </td>
                                                        <td align="center">
                                                            <%#Eval("PName") %>
                                                        </td>
                                                        <td align="center">
                                                            <%#this.GetGangWeiNameByPersonnelID(Eval("PID").ToString())%>
                                                        </td>
                                                        <td align="center">
                                                            <a href="javascript:void(0);" onclick="Del_tr('<%#Eval("PID") %>')">
                                                                <img src="../../../Images/trash.gif" alt="删除"  />
                                                            </a>
                                                            <a href="javascript:void(0);" onclick="SetAnQuan_tr('<%#Eval("PID") %>','<%#Eval("PName") %>')">
                                                                <img src="../../../Images/yes.png" alt="设为安全员" />
                                                            </a>
                                                        </td>
                                                    </tr>
                                                </ItemTemplate>
                                            </asp:Repeater>
                                        </tbody>
                                    </table>
                                    <div style="clear:both">
                                        <br />
                                        <asp:HiddenField ID="HF_Guanshi" runat="server" />
                                        <asp:HiddenField ID="HF_AnQuan" runat="server" />
                                        管事：<asp:Label ID="Lbl_Guanshi" runat="server" Text=""></asp:Label>　
                                        安全员：<asp:Label ID="Lbl_AnQuan" runat="server" Text=""></asp:Label>
                                        <a href="javascript:SetAnQuan_tr('','')">删除安全员</a>
                                    </div>
                                </td>
                            </tr>
                        </table>
                    </td>
                    <td valign="top" width="499">
                        <table width="469" cellpadding="0" cellspacing="0" border="0" align="center">
                            <tr>
                                <td height="46">三、生产服务工作内容：</td>
                            </tr>
                            <tr>
                                <td>1.各岗位工作（简述当日工作中遇到的困难或难题）：</td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:TextBox runat="server" CssClass="input_bg" ID="txt_wenti" Width="469" Height="250" style="line-height:16px;" TextMode="MultiLine"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td height="10"></td>
                            </tr>
                            <tr>
                                <td>2.菜品、服务质量：</td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:TextBox runat="server" CssClass="input_bg" ID="txt_zhiliang" Width="469" Height="100" style="line-height:16px;" TextMode="MultiLine"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td height="46">四、设备维修工作（<asp:Label ID="Label1" runat="server" ForeColor="Red" Text="无内容则需填“无事”"></asp:Label>）</td>
                            </tr>
                            <tr>
                                <td>1.原因<span class="red">（*）</span>：</td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:TextBox runat="server" Text="无事" CssClass="input_bg" ID="txt_weixiuyuanying" Width="469" style="line-height:16px;" Height="200" TextMode="MultiLine" ></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td height="10"></td>
                            </tr>
                            <tr>
                                <td>2.结果<span class="red">（*）</span>：</td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:TextBox runat="server" CssClass="input_bg" Text="无事" ID="txt_weixiujieguo" Width="469" style="line-height:16px;" Height="100" TextMode="MultiLine" ></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td height="10"></td>
                            </tr>
                            <tr>
                                <td height="46">五、安全隐患（<asp:Label ID="Label2" runat="server" ForeColor="Red" Text="无内容则需填“无事”"></asp:Label>）</td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:TextBox runat="server" CssClass="input_bg" ID="txt_anquanyinhuan" Text="无事" Width="469" style="line-height:16px;" Height="100" TextMode="MultiLine"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td height="10"></td>
                            </tr>
                            <tr>
                                <td height="46">六、上料验收（<asp:Label ID="Label3" runat="server" ForeColor="Red" Text="无内容则需填“合格”"></asp:Label>）</td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:TextBox runat="server" CssClass="input_bg" ID="txt_dishtest" Text="合格" Width="469" style="line-height:16px;" Height="100" TextMode="MultiLine"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td height="10"></td>
                            </tr>
                            <tr>
                                <td height="46">七、承包商工作</td>
                            </tr>
                            <tr>
                                <td id='cbslist' runat="server">
                                    
                                </td>
                            </tr>
                            
                            <tr>
                                <td height="10"></td>
                            </tr>  
                            <tr>
                                <td><a href="javascript:newChengbaoshang()">新建承包商工作</a></td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr><td colspan="2" height="10"></td></tr>
            </table>
        </div>
    </div>
    <div class="footer">
        <strong>中海油能源发展配餐服务公司渤海自营油田作业公司&nbsp;&nbsp;版权所有@CopyRight 2012</strong><span>技术支持：北京天择嘉业科技有限公司</span>
    </div>
    <!--遮罩层-->
    <div id="divmain2" class="bg">
    </div>
    <!--弹出层-->
    <div id="divup2" class="center_div" style="padding: 0px; margin-top: -20px; margin-left:-10px;">
        <table style="width: 100%;">
            <tr width="100%">
                <td>
                    <div class="div_0207 left_width400" style="width: 100%; height: 300px; overflow-y: auto;">
                        <h1>
                            <img src="../../Images/cp_h1_03.gif" />人员列表</h1>
                        <table width="100%" border="0" cellspacing="0" cellpadding="0" class="swxx_table">
                            <thead>
                                <tr>
                                    <td style="width: 120px">
                                        序号
                                    </td>
                                    <td>
                                        人员名称
                                    </td>
                                    <td>
                                        岗位
                                    </td>
                                </tr>
                            </thead>
                            <tbody id="PeiCanRenYuan">
                                <asp:Repeater ID="Rep_PeiCanRenYuan" runat="server">
                                    <ItemTemplate>
                                        <tr cid="<%#Eval("id")%>" cname="<%#Eval("Name")%>" cgangwei="<%#this.GetGangWeiNameByID(Eval("PID").ToString())%>">
                                            <td class="xh_td">
                                                <%#Eval("id")%>
                                            </td>
                                            <td>
                                                <%#Eval("Name")%>
                                            </td>
                                            <td>
                                                <%#this.GetGangWeiNameByID(Eval("PID").ToString())%>
                                            </td>
                                        </tr>
                                    </ItemTemplate>
                                </asp:Repeater>
                            </tbody>
                        </table>
                    </div>
                </td>
            </tr>
            <tr align="center">
                <td align="center">                    
                    <a href="#" class="input_btn_a" onclick='divhidel("divmain2","divup2")'>关闭</a>
                </td>
            </tr>
        </table>
    </div>
    <div id="divup3" class="center_div" style="padding:0px; width:552px; height:402px; margin-top: -150px;">
        <table width="452" cellpadding="0" cellspacing="0" border="0">
            <tr>
                <td height="360">
                    <div class="div_0207 left_width400" style="width:550px; height:360px; margin:0px; padding:0px;">
                        <h1 style="margin:0px; padding:0px;"><img src="../../Images/cp_h1_03.gif" />承包商列表</h1>
                        <div style="width:100%; height:30px;">
                            <table width="100%">
                                <tr>
                                    <td width="75" align="right">承包商名称：</td>
                                    <td width="150">
                                        <asp:TextBox runat="server" ID="Txt_Cname" CssClass="input_bg" Width="140"></asp:TextBox>
                                    </td>
                                    <td width="100">
                                        <a class="input_btn_a" href="javascript:SearchContractor();">查　询</a>
                                    </td>
                                    <td>&nbsp;</td>
                                </tr>
                            </table>
                        </div>
                        <div id="ContractorList"></div>
                    </div>
                </td>
            </tr>
            <tr>
                <td align="center" height="40">
                    <a href="javascript:divhidel('divmain2','divup3')" class="input_btn_a">关闭</a>
                </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>
